package com.umpay.privi.util;

import java.util.Date;

import com.umpay.privi.common.Constants;
import com.umpay.privi.common.ReqMessage;
import com.umpay.privi.common.XmlData;

/**
 * 客户端请求权限Ejb的便利工具类
 * @author 肖明 2013-05-08
 */
public class ClientUtil {

	public static ReqMessage getReqMessage(String preStr, int rpidLen ,String sysId) {
		ReqMessage req = new ReqMessage();
		req.setRpid(preStr + SerialUtil.getRpid(Constants.RPID_SEQ,rpidLen));
		Date nowDate = new Date();
		req.setReqDate(DateUtil.date8(nowDate));
		req.setReqTime(DateUtil.time6(nowDate));
		req.put(XmlData.SYSID, sysId);
		return req;
	}
}
